package org.gavin.core.annotation;

import jakarta.validation.Constraint;
import jakarta.validation.Payload;
import org.gavin.core.validator.SpecialCharactersValidator;

import java.lang.annotation.*;

/**
 * SpecialCharacters
 *
 * @author grl
 * @date 2022/5/5
 */
@Documented
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.PARAMETER, ElementType.METHOD})
@Constraint(validatedBy = SpecialCharactersValidator.class)
public @interface SpecialCharacters {

    String message() default "包含特殊字符";

    Class<?>[] groups() default {};

    Class<? extends Payload>[] payload() default {};
}
